<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>C语言中文网</title>
</head>
<body>
<form th:action="@{/login}" method="post">
  <table style="margin: auto">
    <tr>
      <td th:if="${not #strings.isEmpty(msg)}" colspan="2" align="center">
        <p style="color: red;margin: auto" th:text="${msg}"></p>
      </td>
    </tr>
    <tr>
      <td>用户名：</td>
      <td><input type="text" name="userName" required><br></td>
    </tr>
    <tr>
      <td>密码：</td>
      <td><input type="password" name="password" required><br></td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <input type="submit" value="登陆">
        <input type="reset" value="重置">
      </td>
    </tr>
  </table>
</form>
</body>
</html>
